<?php

namespace Modules\Common\Models\Validation;


/**
 *@property int $id
 *@property int $sid
 *@property int $eid
 *@property int $user_id
 *@property int $ebook_id
 *@property string $start_time
 *@property string $end_time
 *@property string $duration
 *@property string $total_duration
 *@property string $progress
 *@property string $last_read_chapter
 *@property string $last_read_time
 *@property int $is_completed
 *@property string $created_at
 *@property string $updated_at
 *@property string $deleted_at
 */
trait UserReadingRecordsValidation
{


    public function createRules()
    {
         return [
            'rules' => [
                'user_id'=>'integer',
                'ebook_id'=>'integer',
                'start_time'=>'between:0,32',
                'end_time'=>'between:0,32',
                'duration'=>'between:0,32',
                'total_duration'=>'between:0,32',
                'progress'=>'between:0,255',
                'last_read_chapter'=>'between:0,32',
                'last_read_time'=>'between:0,32',
                'is_completed'=>'integer',
            ],
            'messages' => [
            ],
            'customAttributes' => [
            ]
        ];
    }

    public function updateRules()
    {
         return [
            'rules' => [
                'user_id'=>'integer',
                'ebook_id'=>'integer',
                'start_time'=>'between:0,32',
                'end_time'=>'between:0,32',
                'duration'=>'between:0,32',
                'total_duration'=>'between:0,32',
                'progress'=>'between:0,255',
                'last_read_chapter'=>'between:0,32',
                'last_read_time'=>'between:0,32',
                'is_completed'=>'integer',
            ],
            'messages' => [
            ],
            'customAttributes' => [
            ]
        ];
    }


}
